package GUI;

import java.awt.*;
import javax.swing.*;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.Iterator;
/***
 * This class creates instance of EditReqStageManagerGui	
 * to display when needed 
 * @author Nofar
 *
 */
public class EditReqStageManagerGui extends JPanel{
	
	private static final long serialVersionUID = 1L;
	private JButton btnCancel;
	private JButton btnExtentionRequest;
	private JButton btnUpdate;
	private JComboBox reqNum;
	private JComboBox StageNum;
	
	/**
	 * the constructor
	 */
	public EditReqStageManagerGui(){
		super();
		btnCancel= new JButton("cancel");
		btnExtentionRequest = new JButton("Extention request");
		btnUpdate = new JButton("Update stage");
		reqNum = new JComboBox();
		reqNum.setModel(new DefaultComboBoxModel(new String[] {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}));
		StageNum = new JComboBox();
		StageNum.setModel(new DefaultComboBoxModel(new String[] {"", "ESTIMATION", "EXAMINATION", "PERFORMANCE", "TESTING"}));
		initiate();
	}
	/**
	 * This method initializes EditReqStageManagerGui	
	 */
	public void initiate(){
		
		JLabel lblNewLabel = new JLabel("Edit Request Window");
		lblNewLabel.setBounds(113, 28, 202, 40);
		lblNewLabel.setForeground(Color.BLUE);
		lblNewLabel.setFont(new Font("Arial", Font.BOLD, 17));
		add(lblNewLabel);
		
		JLabel lblEnterRequestNumber = new JLabel("Enter request number:");
		lblEnterRequestNumber.setFont(new Font("Arial", Font.BOLD, 12));
		lblEnterRequestNumber.setBounds(31, 79, 140, 30);
		add(lblEnterRequestNumber);
		
		JLabel labelEnterStageNum = new JLabel("Enter stage name:");
		labelEnterStageNum.setFont(new Font("Arial", Font.BOLD, 12));
		labelEnterStageNum.setBounds(31, 137, 140, 30);
		add(labelEnterStageNum);
		
		
		btnExtentionRequest.setFont(new Font("Arial", Font.BOLD, 12));
		btnExtentionRequest.setBounds(141, 197, 220, 30);
		add(btnExtentionRequest);
		
		btnUpdate.setFont(new Font("Arial", Font.BOLD, 12));
		btnUpdate.setBounds(141, 249, 220, 30);
		add(btnUpdate);
		
		
		btnCancel.setFont(new Font("Arial", Font.BOLD, 12));
		btnCancel.setBounds(32, 296, 100, 40);
		add(btnCancel);
		reqNum.setBounds(181, 79, 140, 30);
		
		add(reqNum);
		
		StageNum.setBounds(181, 137, 140, 30);
		add(StageNum);
		
		setLayout(null);
		setSize(new Dimension(445, 365));		
	}
	/**
	 * 
	 * @return the extension request button
	 */
	public JButton getExtentionRequestButt(){
		return btnExtentionRequest;		
	}
	/**
	 * 
	 * @return the update stage button
	 */
	public JButton getUpdateButt(){
		return btnUpdate;		
	}
	/**
	 * 
	 * @return the cancel button
	 */
	public JButton getCanButt(){
		return btnCancel;
	}
	/**
	 * 
	 * @return JComboBox with the request number
	 */
	public JComboBox getReqNum(){
		return reqNum;
	}
	
	/**
	 * 
	 * @return JComboBox with the stage name
	 */
	public JComboBox getStageNum(){
		return StageNum;
	}

	/**
	 * 
	 * @param btnCancel to set the cancel button
	 */
	public void setBtnCancel(JButton btnCancel) {
		this.btnCancel = btnCancel;
	}

	/**
	 * 
	 * @param btnExtentionRequest to set the extension button
	 */
	public void setBtnExtentionRequest(JButton btnExtentionRequest) {
		this.btnExtentionRequest = btnExtentionRequest;
	}

	/**
	 * 
	 * @param btnUpdate to set the update button
	 */
	public void setBtnUpdate(JButton btnUpdate) {
		this.btnUpdate = btnUpdate;
	}

	/**
	 * 
	 * @param reqNum to set the comboBox with the request number
	 */
	public void setReqNum(JComboBox reqNum) {
		this.reqNum = reqNum;
	}
	/**
	 * 
	 * @param stageNum to  set the comboBox with the stage name
	 */
	public void setStageNum(JComboBox stageNum) {
		this.StageNum = stageNum;
	}
}
